## 读取ERP里的一些不变的属性

from top.wardyan.core.wdb.core.db import *

# 客户代码
ERP_CUSTCODE = find("select xValue from dbo.st_systemdata as s (nolock) where sID = 196007")["xValue"]

def ERP_LASTUPDATE() -> str:
    return find("select convert(varchar(30), cast(s.xFloat as datetime), 121) as xValue from dbo.st_systemdata as s (nolock) where sID = 196480")["xValue"]


print("ERP客户代码:", ERP_CUSTCODE)
print("ERP最后更新时间:", ERP_LASTUPDATE())